﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
    <title>流程发起测试</title>
    <link href="../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/easyUI15/jquery.min.js" type="text/javascript"></script>
    <script src="../Scripts/easyUI15/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../Scripts/config.js" type="text/javascript"></script>
    <script language="JavaScript" src="../Comm/JScript.js" type="text/javascript"></script>
    <script src="../Scripts/CommonUnite.js" type="text/javascript"></script>
    <script src="../Scripts/EasyUIUtility.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        /* ESC Key Down */
        function Esc() {
            if (event.keyCode == 27)
                window.close();
            return true;
        }

        var fk_flow = GetQueryString('FK_Flow');
        var fk_node = GetQueryString('FK_Node');

        //页面启动函数.
        $(function () {

            $("#Msg").html("<img src=../Img/loading.gif />&nbsp;正在加载,请稍后......");

            InitPage();

            $("#Msg").html("");
        });

        //初始化数据.
        function InitPage() {

            $("#Msg").html("<img src=../Img/loading.gif />&nbsp;正在加载,请稍后......");

            var doType = GetQueryString("DoType");
            if (doType == "" || doType == null)
                doType = "TestFlow_Init";

            var fk_flow = GetQueryString("FK_Flow");
            var doWhat = GetQueryString("DoWhat");
            var userNo = getQueryStringByName("UserNo");

            //初始化表格.
            $.ajax({
                type: 'post',
                async: true,
                url: Handler + "?DoType=" + doType + "&UserNo=" + userNo + "&DoWhat=" + doWhat + "&FK_Flow=" + fk_flow + "&m=" + Math.random(),
                dataType: 'html',
                success: function (data) {

                    if (data.indexOf('err@') == 0) {

                        document.getElementById("Msg").innerHTML = data;

                        if (data.indexOf('管理员') != -1) {
                            alert(data);
                            return;
                        }

                        if (window.confirm(data) == true) {
                            window.location.href = './AttrNode/NodeAccepterRole.htm?FK_Node=' + fk_flow + '01';
                            return;
                        }
                    }

                    if (data.indexOf('url@') == 0) {
                        var url = data.replace('url@', '');
                        window.location.href = url;
                        return;
                    }

                    data = JSON.parse(data);

                    //增加处理.
                    for (var i = 0; i < data.length; i++) {

                        var newRow = "";
                        var emp = data[i];

                        newRow = "<tr ><td class=Idx>" + i + "</td>";
                        newRow += "<td>" + emp.No + "</td>";
                        newRow += "<td>" + emp.Name + "</td>";

                        var url = "<a target='_blank' href='?DoType=TestFlow_ReturnToUser&DoWhat=ACE&UserNo=" + encodeURIComponent(emp.No) + "&FK_Flow=" + fk_flow + "'  ><img src='./../Img/ie.gif' border=0 />AppACE</a>";
                        //  newRow += "<td>" + url + "</td>";

                        url = "<a target='_blank' href='?DoType=TestFlow_ReturnToUser&DoWhat=StartClassic&UserNo=" + encodeURIComponent(emp.No) + "&FK_Flow=" + fk_flow + "'  ><img src='./../Img/ie.gif' border=0 />经典</a>";
                        newRow += "<td>" + url + "</td>";

                        url = "<a target='_blank' href='?DoType=TestFlow_ReturnToUser&DoWhat=StartClassic&UserNo=" + encodeURIComponent(emp.No) + "&FK_Flow=" + fk_flow + "&IsMobile=1'  ><img src='./../Img/ie.gif' border=0 />手机模式</a>";
                        // newRow += "<td>" + url + "</td>";
                        newRow += "<td>无</td>";

                        newRow += "<td>" + emp.FK_DeptText + "</td>";
                        newRow += "</tr>";
                        $("#Table1 tr:last").after(newRow);
                    }
                }
            });
        }
         
    </script>
</head>
<body onkeypress="Esc()" class="easyui-layout">
<table>
<tr>
<td valign=top style="width:30%"> 
    <fieldset>
    <legend><img src='../Img/Help.gif' />发起说明</legend>
     <ul>
     <li> 该界面是流程发起测试界面。 </li>
     <li> 右侧的人员列表，就是发起该流程的所有人员列表。</li>
     <li> 一个流程能被那些人发起是由开始节点的访问规则来确定的。</li>
     <li> 选择一个模式点击一个人员，发起该流程，系统自动按照该人员登录，并且打开该流程的第一个节点表单界面。</li>
     </ul>
    </fieldset>

    <fieldset>
    <legend><img src='../Img/ccbpm.ico' />功能执行.</legend>
     <ul>
     <li> <a href="javascript:alert('该功能移动流程属性,设计流程-》流程属性-》流程维护');" > 删除该流程的所有数据 </li>
     <li> <a href="javascript:alert('该功能移动流程属性,设计流程-》流程属性-》流程维护');" > 删除所有流程的实例数据 </li>
     <li> <a href="../AppClassic/Login.htm" >转到前端登录窗口 </a></li>
     </ul>
    </fieldset>

 </td>

<td valign=top> 
        <table id="Table1" class="Table" cellpadding="0" cellspacing="0" border="0" style="width: 100%">
        <caption>流程发起测试,能够发起该流程的人员列表.(<font color=red>运行流程之前不检查可能会导致字段没有创建的错误</font>)</caption>
            <tr>
                <th> 序 </th>
                <th> 编号</th>
                <th> 名称</th>
              <!--  <th> ACE模式</th>-->
                <th> 经典模式</th>
                <th> 手机模式</th>
                <th> 所在部门</th>
            </tr>
        </table>
    </td>
</tr>
</table>
   
    <div id="Msg"></div>

</body>
</html>
